/// Create by kyluzoi
/// Date: 2021-08-10
///
/// Description:
// To parse this JSON data, do
//
//     final transactionListMo = transactionListMoFromJson(jsonString);

import 'dart:convert';

import 'package:flutter_module/model/transaction_mo.dart';

TransactionListMo transactionListMoFromJson(String str) =>
    TransactionListMo.fromJson(json.decode(str));

String transactionListMoToJson(TransactionListMo data) =>
    json.encode(data.toJson());

class TransactionListMo {
  TransactionListMo({
    required this.pageNum,
    required this.totalCount,
    required this.pageSize,
    required this.data,
    required this.totalPage,
  });

  int pageNum;
  int totalCount;
  int pageSize;
  List<TransactionMo> data;
  int totalPage;

  factory TransactionListMo.fromJson(Map<String, dynamic> json) =>
      TransactionListMo(
        pageNum: json["pageNum"],
        totalCount: json["totalCount"],
        pageSize: json["pageSize"],
        data: List<TransactionMo>.from(
            json["data"].map((x) => TransactionMo.fromJson(x))),
        totalPage: json["totalPage"],
      );

  Map<String, dynamic> toJson() => {
        "pageNum": pageNum,
        "totalCount": totalCount,
        "pageSize": pageSize,
        "data": List<dynamic>.from(data.map((x) => x.toJson())),
        "totalPage": totalPage,
      };
}

/// 订单类型
class OrderType {
  /// 活动
  static const int activity = 1;

  /// 课程
  static const int course = 2;

  /// 品牌
  static const int brands = 3;

  ///会员
  static const int members = 4;

  /// 合作服务商
  static const int serviceProvider = 8;

  /// 红人
  static const int celebrity = 11;

  /// 红人机构
  static const int celebrityOrg = 12;

  ///工厂
  static const int factoryType = 14;
}
